package com.xie.smfs.effect;

import net.minecraft.entity.attribute.AttributeContainer;
import net.minecraft.entity.effect.StatusEffect;
import net.minecraft.entity.effect.StatusEffectCategory;
import net.minecraft.entity.LivingEntity;
import com.xie.smfs.client.EffectRenderHandler;

public class RedGhostDomainEffect extends StatusEffect {
    public RedGhostDomainEffect() {
        super(StatusEffectCategory.HARMFUL, 0xFF0000); // 红色效果
    }

    @Override
    public boolean canApplyUpdateEffect(int duration, int amplifier) {
        return true; // 每tick更新
    }

    @Override
    public void applyUpdateEffect(LivingEntity entity, int amplifier) {
        // 可以在这里添加效果的逻辑
    }

    @Override
    public void onRemoved(LivingEntity entity, AttributeContainer attributes, int amplifier) {
        super.onRemoved(entity, attributes, amplifier);
        EffectRenderHandler.forceRestore();
    }
}